home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / U-Z / XcShell.cpt / XcShell / XCMDversion.c < prev    next >
Encoding:
Text File  |  1991-09-01  |  1.2 KB  |  49 lines  |  [TEXT/KAHL]

  1. //
  2. //    "XcShell" Skeletal XCMD/XFCN    version identification function
  3. //
  4. //    Copyright ©1991 Mark M. Owen -- All rights reserved
  5. //
  6. #include <string.h>
  7.  
  8. #include "SysEnvirons.h"
  9.  
  10. #include "XCMDutils.h"
  11. #include "XCMDversion.h"
  12.  
  13. //////////////////////////////////////////////////////////////
  14. //    set the definition below to your version information    //
  15. //////////////////////////////////////////////////////////////
  16. #define    VERSION     "\pXC v0.0 Copyright ©1991 Mark M. Owen -- All Rights Reserved"
  17.  
  18.  
  19. void    XCMDVersion(void)
  20. {
  21.     char    S[512];
  22.     char    *ps        = S+1;
  23.     char    V[512]    = VERSION;
  24.     long    n;
  25.     
  26.     V[V[0]+1]    = 0x00;
  27.     *ps            = 0x00;
  28.     AppendNum( IsColorGDevice(), ps, "," );
  29.     AppendNum( HasColorQD(), ps, "," );
  30.     AppendNum( Has32BitQD(), ps, "," );
  31.     AppendNum( HasFPU(), ps, "," );
  32.     AppendNum( GDevicePixelBits(), ps, "," );
  33.     AppendNum( MachineType(), ps, "," );
  34.     n = (short)SystemVersion();
  35.     AppendNum( n>>8, ps, "." );
  36.     AppendNum( n-((n>>8)<<8), ps, "," );
  37.     AppendNum( Processor(), ps, "," );
  38.     AppendNum( KeyBoardType(), ps, " " );
  39.     AppendCStr( ps, &V[1] );
  40. #ifdef    _MC68881_
  41.     AppendCStr( ps, ". 881" );    //    this is FPU optimized code
  42. #else
  43.     AppendCStr( ps, "." );        //    this is Generic Mac Code
  44. #endif    _MC68881_
  45.     S[0] = strlen( ps );
  46.     SetReturnValue( S );
  47. }
  48.  
  49.